Welcome to ‘IBM Cloud Code Engine.’ After watching this video, you will be able
to describe the challenges of self-hosting microservices, explain the IBM Cloud Code Engine, and explain how IBM Cloud Code Engine helps
your deployment of applications. After successfully building and testing your
microservices locally, you need to deploy your microservices. If you choose to self-host your microservices,
you need to make detailed adjustments and tackle many non-trivial challenges carefully. First, you need to deliberately configure
and build your microservices to make them production-ready, including necessary assets
like library dependencies, resources, credentials, and so on. Then compile and build them into one executable
binary to run on hosting environments. Next, you need to carefully choose the infrastructure
to run your microservices, such as web servers, operating systems, networks, databases, and
so on. Your team needs to select from numerous options
carefully. Since your microservices undergo fluctuating
traffic, you will need to scale up or down dynamically. For example, e-commerce websites will always
have peak traffic on holidays that can decrease significantly after several days or a week. In most cases, you will need to deploy multiple
related microservices that work and communicate. The communication among the microservices
needs to be reliable and secure. And finally, activities like logging, monitoring,
and working on dashboards are also required to ensure all microservices are stable and
any production issues are identifiable or even foreseen. Now there can be other challenges of self-hosting
which are dependent and specific to the implementation and build of the microservices. Next, you will see a more specific example
of how a Python-based microservice can be deployed. Suppose you have built a Python-based microservice,
which may be a Flask, Django, or any other Python web application. The microservice cannot start providing the
required service directly. It requires a web server interface or entry
point to call your microservice. For Python-based microservices, there are
two main types of interfaces available: Web Server Gateway Interface, or WSGI, is
the main Python standard for communication between web servers and web applications or
microservices. And as the name suggests, it supports synchronous
service calls only. There are many popular WSGI web servers, such
as Green Unicorn and uWSGI. You need to decide which one suits your requirements
best. An Asynchronous Server Gateway Interface,
or ASGI, is another web server interface. The main difference from WSGI is that it supports
asynchronous code so that your microservice can be called asynchronously. Some popular ASGI web servers are Daphne and
Hypercorn. Now either WSGI or ASGI web servers need to be
running on a certain type of infrastructure. Depending on your service requirements or
agreements, the infrastructure can be a laptop, a dedicated workstation, or a sophisticated
cluster with hundreds of computing and data nodes. As can be observed, you will need to make
many tradeoffs and efforts to deploy a microservice on production. Thankfully, you can deploy microservices on
cloud platforms with minimal effort now. Now, let’s introduce IBM Cloud Code Engine,
a comprehensive and powerful platform for deploying your microservices easily. IBM Cloud Code Engine, or just “Code Engine,”
abstracts the operational burden of building, deploying, and managing workloads so that
the developers can focus on code development. The main goal of IBM Cloud Code Engine is
to ease developers' deployment burden. With its help, developers can push their code
to the cloud platform and disregard the infrastructure. IBM Cloud Code Engine can be seen as a fully
managed, serverless platform. It combines all features that are required
by Platform as a Service (PaaS), Containers as a Service (CaaS), and serverless deployment
models. IBM Cloud Code Engine runs your workloads,
including microservices, web apps, event-driven functions, or batch jobs. If you have built a microservice, you can
run it as an IBM Cloud Code Engine application to serve incoming HTTPS requests with an intuitive
user experience without managing your infrastructure easily. IBM Cloud Code Engine has three main use cases
or deployment modes. The first use case involves deploying a built
application to Code Engine. An application here may represent a microservice,
a web app, or a console app. The second use case is pushing the source
code directly. The Code Engine can build your application
from source code, either from a remote repository like GitHub repo or your local workspace. The built application can then be automatically
deployed without worrying about the building process, which is convenient and time-saving. And the third use case is creating and running
batch jobs like a data processing or analytics task. For example, if one of your microservices
needs to analyze results, you can deploy a batch job to perform the analytics tasks on
the same platform. So, all your deployed microservices and jobs
can work seamlessly together because they are all hosted within the same infrastructure. Let’s summarize the potential benefits that
IBM Cloud Code Engine can provide. It takes care of all the cluster management,
including provisioning, configuring, scaling, and managing servers. You don’t need to worry about the underlying
infrastructure and can focus on your code. It also builds and deploys your apps in seconds. This can be important if you want to deploy
an emergent update. The Code Engine automatically scales your
workload up and down. It controls platform and services access permissions
based on IBM Cloud infrastructure and access management. It also provides secure connections using
Transport Layer Security and isolates workloads. And finally, it fully integrates into the
IBM Cloud so that you can take advantage of the full catalog of IBM Cloud services. In this video, you learned that: Self-hosted microservices can be very complex
and challenging, the IBM Cloud Code Engine is a fully managed
platform that takes care of all the hard deployment work, allowing developers to focus on their
code, and the IBM Cloud Code Engine has three main
use cases: deploy applications, build and deploy applications,
and run jobs.